//
//  ComparisonCarHeader.m
//  SecondPage
//
//  Created by winston on 13-4-16.
//  Copyright (c) 2013年 winston. All rights reserved.
//

#import "ComparisonCarHeader.h"

@implementation ComparisonCarHeader

@synthesize carSpecId;
@synthesize carIndex;

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        [self setBackgroundColor:[UIColor colorWithRed:0.937 green:0.937 blue:0.937 alpha:1.0]];
        
        nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, 200, frame.size.height)];
        nameLabel.backgroundColor = [UIColor clearColor];
        nameLabel.textAlignment = NSTextAlignmentLeft;
        nameLabel.textColor = [UIColor colorWithRed:0.2 green:0.2 blue:0.2 alpha:1.0];
        nameLabel.font = [UIFont fontWithName:@"Arial-BoldMT" size:13];
        [self addSubview:nameLabel];
        [nameLabel release];
        
        removeBtn = [[UIButton alloc]initWithFrame:CGRectMake(220, (frame.size.height-20)/2, 20, 20)];
        [removeBtn setImage:[UIImage imageNamed:@"AllAuto_Comparison_Button_Delete"] forState:UIControlStateNormal];
        [self addSubview:removeBtn];
        [removeBtn release];
    }
    return self;
}

-(void)setTitle:(NSString*)title;
{
    nameLabel.text = title;
}
-(void)setCarIndex:(NSInteger)_carIndex
{
    carIndex = _carIndex;
}
@end
